Adding a Submit Button

A submit button is an important control in a form because when the user clicks the button, the data in the form is transferred to the URLs specified in the <form action> tag. The <input type=”submit”> tag is used to add a submit button on a Web page.

Below given in table lists a brief description of the attributes of the submit button:

Attribute

Description

name

Adds a name to the button

value

Defines the ext to be written on the button

align

Defines the alignment of the button

tabindex

Defines the tab order of the button, if there are multiple buttons in a Web page

Let’s do the following steps to add a submit button:


<!DOCTYPE html>
<html>
<head>
    <title> Adding Submit Button</title>
</head>
<body>
    <h4> Enter username and password</h4>
    <form action=”Example.html” method=”post”>
        Enter your name :
        <input type=”text” name=”name” /></br></br>
        Enter Password:
<input type=”password” name=”password” />
        <input type=”submit” value=”Submit” />
    </form>
</body>
</html> 

Save the document with the name AddingSubmitButton.html and open on browser.